//addToCart的vuex仓库
import { addToCart } from "@/API/index"
const actions = {
    // 这个是商品数量切换的网络请求
    async addTosuccessful({ commit }, { skuId, skuNum }) {
        let Successful = await addToCart(skuId, skuNum);
        if (Successful.code == 200) {
            // 代表返回成功的结果
            return true;
        }
        else {
            // 代表返回失败的结果
            return Promise.reject(new Error('faile'));
        }
    },
}
const mutations = {


}
const state = {
}
const getters = {
}
export default {
    // NamedNodeMap: true,
    actions,
    mutations,
    state,
    getters
}



